<!DOCTYPE html>
<html lang="en">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<script src="js/jquery-3.0.0.js"></script>
		<script src="js/jquery-3.0.0.min.js"></script>
		<title>实验室设备管理系统</title>

		<meta name="description" content="User login page" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
		<link rel="shortcut icon" href="plugins/images/favicon.ico" type="image/x-icon" />
		
		<!-- bootstrap & fontawesome -->
		<link rel="stylesheet" href="plugins/ace/assets/css/bootstrap.css" />
		<link rel="stylesheet" href="plugins/ace/assets/css/font-awesome.css" />

		<!-- text fonts -->
		<link rel="stylesheet" href="plugins/ace/assets/css/ace-fonts.css" />

		<!-- ace styles -->
		<link rel="stylesheet" href="plugins/ace/assets/css/ace.css" />

		<link rel="stylesheet" href="plugins/ace/assets/css/ace-rtl.css" />
		
		<script src="js/jquery-3.0.0.js"></script>
		<script src="js/jquery-3.0.0.min.js"></script>
		
		<link rel="stylesheet" href="plugins/layer/skin/layer.css">
		<link rel="stylesheet" href="plugins/layer/skin/layer.ext.css">
		<script src="plugins/layer/layer.js"></script>
	
	</head>

	<body class="login-layout blur-login ">
		<div class="main-container">
			<div class="main-content">
				<div class="row">
					<div class="col-sm-10 col-sm-offset-1">
						<div class="login-container">
							<div class="center">
							<h4 class="blue" id="id-company-text">&nbsp;</h4>
								<h1>
									<!-- <i class="ace-icon fa fa-leaf green"></i> -->
									<span style="float: left"><img alt="LOGO" style="height: 43px;" src="plugins/images/minlogo.png"></span>
									<span class="red">实验室设备管理系统</span>
									<!-- <span class="white" id="id-text2">实验室设备管理系统</span> -->
								</h1>
								<h4 class="blue" id="id-company-text">&nbsp;</h4>
							</div>

							<div class="space-6"></div>

							<div class="position-relative">
								<div id="signup-box" class="signup-box visible widget-box no-border">
									<div class="widget-body">
										<div class="widget-main">
											<h4 class="header green lighter bigger">
												<i class="ace-icon fa fa-lock green"></i>
												修改密码
											</h4>

											<div class="space-6"></div>
											<p> 请输入您的信息: </p>

											<form>
												<fieldset>
													<input id="user_oldPwd" hidden="hidden" type="text" value="${oldPwd}">
													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="email" id="user_email" class="form-control" placeholder="请输入您的邮箱" />
															<i class="ace-icon fa fa-envelope"></i>
														</span>
													</label>

													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="password" id="user_newPwd" class="form-control" placeholder="请输入新密码" />
															<i class="ace-icon fa fa-lock"></i>
														</span>
													</label>

													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="password" id="user_newPwd2" class="form-control" placeholder="请再次输入新密码" />
															<i class="ace-icon fa fa-retweet"></i>
														</span>
													</label>

													<div class="space-24"></div>

													<div class="clearfix">
														<button type="reset" class="width-30 pull-left btn btn-sm">
															<i class="ace-icon fa fa-refresh"></i>
															<span class="bigger-110">重置</span>
														</button>

														<button type="button" onclick="submitNewPwd()" class="width-65 pull-right btn btn-sm btn-success">
															<span class="bigger-110">提交</span>

															<i class="ace-icon fa fa-arrow-right icon-on-right"></i>
														</button>
													</div>
												</fieldset>
											</form>
										</div>

										<div class="toolbar center">
											<a href="logout" class="back-to-login-link">
												<i class="ace-icon fa fa-arrow-left"></i>
												登录
											</a>
										</div>
									</div><!-- /.widget-body -->
								</div><!-- /.signup-box -->
								
							</div><!-- /.position-relative -->

							<div class="navbar-fixed-top align-right">
								<br />
								&nbsp;
								<a id="btn-login-dark" href="#">黑色</a>
								&nbsp;
								<span class="blue">/</span>
								&nbsp;
								<a id="btn-login-blur" href="#">蓝色</a>
								&nbsp;
								<span class="blue">/</span>
								&nbsp;
								<a id="btn-login-light" href="#">浅色</a>
								&nbsp; &nbsp; &nbsp;
							</div>
						</div>
					</div><!-- /.col -->
				</div><!-- /.row -->
			</div><!-- /.main-content -->
		</div><!-- /.main-container -->

		<script type="text/javascript">
			window.jQuery || document.write("<script src='plugins/ace/assets/js/jquery.js'>"+"<"+"/script>");
		</script>

		<script type="text/javascript">
			if('ontouchstart' in document.documentElement) document.write("<script src='plugins/ace/assets/js/jquery.mobile.custom.js'>"+"<"+"/script>");
		</script>

		<!-- inline scripts related to this page -->
		<script type="text/javascript">
			jQuery(function($) {
			 $(document).on('click', '.toolbar a[data-target]', function(e) {
				e.preventDefault();
				var target = $(this).data('target');
				$('.widget-box.visible').removeClass('visible');//hide others
				$(target).addClass('visible');//show target
			 });
			});
			
			
			//you don't need this, just used for changing background
			jQuery(function($) {
			 $('#btn-login-dark').on('click', function(e) {
				$('body').attr('class', 'login-layout');
				$('#id-text2').attr('class', 'white');
				$('#id-company-text').attr('class', 'blue');
				
				e.preventDefault();
			 });
			 $('#btn-login-light').on('click', function(e) {
				$('body').attr('class', 'login-layout light-login');
				$('#id-text2').attr('class', 'grey');
				$('#id-company-text').attr('class', 'blue');
				
				e.preventDefault();
			 });
			 $('#btn-login-blur').on('click', function(e) {
				$('body').attr('class', 'login-layout blur-login');
				$('#id-text2').attr('class', 'white');
				$('#id-company-text').attr('class', 'light-blue');
				
				e.preventDefault();
			 });
			 
			});
		</script>
		<!-- 更新密码 -->
		<script type="text/javascript">
			/**
			 * 提交新密码
			 */
			function submitNewPwd(){
				var email = $("#user_email").val();
				var oldPwd = $("#user_oldPwd").val();
				var newPwd = $("#user_newPwd").val();
				var newPwd2 = $("#user_newPwd2").val();
				
				// 表单验证
				if(email==""){
					layer.msg("请填写邮箱");
					return;
				}else if(oldPwd==""){
					layer.msg("链接已失效，请重新找回密码");
					return;
				}else if(newPwd==""){
					layer.msg("请填写新密码");
					return;
				}else if(newPwd!=newPwd2){
					layer.msg("两次输入的密码不一致");
					return;
				}
				
				var url = "change/changePwd";  // 修改密码接口
				var data = {  // 所需参数
						"email":email,
						"oldPwd":oldPwd,
						"newPwd":newPwd
					};
				$.post(url,data,function(resp){
					if(resp=="success"){
						layer.msg("密码修改成功");
					}else{
						layer.msg("密码修改失败！");
					}
					
				});
			}
		</script>
	</body>
</html>
		